package com.tubang.organization.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

/**
 * <p>
 * 用户-角色
 * </p>
 *
 * @author wsl
 * @since 2017-11-30
 */
@TableName("tb_user_role")
public class UserRoleEntity extends Model<UserRoleEntity> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户编号
     */
    @TableId("user_id")
	private String userId;
    /**
     * 角色编号
     */
	@TableField("role_id")
	private String roleId;


	public String getUserId() {
		return userId;
	}

	public UserRoleEntity setUserId(String userId) {
		this.userId = userId;
		return this;
	}

	public String getRoleId() {
		return roleId;
	}

	public UserRoleEntity setRoleId(String roleId) {
		this.roleId = roleId;
		return this;
	}

	@Override
	protected Serializable pkVal() {
		return this.userId;
	}

	@Override
	public String toString() {
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.append("UserRole{");
		stringBuilder.append("userId=");
		stringBuilder.append(userId);
		stringBuilder.append(", roleId=");
		stringBuilder.append(roleId);
		stringBuilder.append("}");
		return stringBuilder.toString();
	}
}
